
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        tags_in_homepage: [],
        tags_in_chat_room_page: [],
    },

    methods: {
        /**
         * 请求首页的房间品类列表
         */
        requestRoomTagListInHomepage() {
            let url = "{% url 'gma:api_get_room_tag_list_in_homepage' %}";
            new my_ajax(url, {}, '', '', (data) => {
                console.table(data);
                this.tags_in_homepage = data;
            });
        },

        /**
         * 请求聊天室的房间品类列表
         */
        requestRoomTagListInChatRoomPage() {
            let url = "{% url 'gma:api_get_room_tag_list_in_chat_room_page' %}";
            new my_ajax(url, {}, '', '', (data) => {
                console.table(data);
                this.tags_in_chat_room_page = data;
            });
        },
    },

    mounted() {
        this.requestRoomTagListInHomepage();
        this.requestRoomTagListInChatRoomPage();
    },
});
